1. Field of the Invention
The present invention relates to a circuit and a method for detecting a duty ratio of a pulse width modulation (PWM) signal, capable of being applied to a brushless direct current (BLDC) motor and calculating a duty ratio based on a rising edge or a falling edge of the PWM signal.
2. Description of the Related Art
Generally, in a control scheme using a pulse width modulation (PWM) signal, in order to control a rotation speed of a brushless direct current (BLDC) motor, a width of the PWM signal is changed to control an average voltage of a driving voltage.
The BLDC motor may be used in various products such as a fan, a pump, servo systems of heating, ventilation and air conditioning (HVAC) blower and compressor, a traction control, a sewing machine, a treadmill, and the like.
In a driving apparatus using the PWM signal as described above, in a PWM signal having a high level or a low level, among various pieces of information included therein, a duty ratio, a ratio of the high level to one period including the high level and the low level, may be the most important. Therefore, it may be very important to accurately measure the duty ratio of the PWM signal without an error.
A scheme of detecting the duty ratio of the PWM signal according to the related art will be briefly described.
A circuit for detecting a duty ratio according to the related art may detect a detection indication signal generated for a predetermined interval of time, count the entire time (Tentire=Thigh+Tlow) until the next detection indication signal (T(k+1)) is detected when the detection indication signal (T(k)) is detected, count a high level maintaining time (Thigh) in which a high level is maintained between the two detection indication signals (T(k) and T(k+1)), and calculate a ratio of the high level maintaining time (Thigh) to the entire time (Tentire=Thigh+Tlow) using the counted value, thereby calculating a duty ratio of a PWM signal.
The duty ratio of the PWM signal is calculated with the same scheme as described above and is continuously updated during each period.
In the scheme of calculating the duty ratio of the PWM signal according to the related art as described above, even in the case in which the PWM signal is input, a PWM count register is updated for a detection indication signal.
However, since points in time at which the detection indication signal is generated and a point in time at which the high level of the PWM signal occurs may not accurately coincide with each other, the point in time at which the detection indication signal is generated may be an intermediate point between the high level and the low level of the PWM signal. In this case, an error in calculation of the duty ratio may occur at a boundary of the detection indication signal.
The lower the frequency of the PWM signal, the higher the ratio of the error as described above.
The following Related Art Document, which relates to a motor control apparatus, discloses a technical feature of calculating a duty ratio, but does not disclose a technical feature of using a detection indication signal and an edge of a PWM signal in order to detect the duty ratio.